<?php 
namespace app\dashboard\validate;
use think\Validate;
class Position extends Base
{
    protected $rule = [
        'id'     => 'require|number|intconvert:id',
        'transverse_letter'     => 'require|strtrim:transverse_letter',
        'portrait_letter'          => 'require|strtrim:portrait_letter',
        'box_count'     => 'require|number|intconvert:box_count',
    ];

    protected $message = [
        'id'     => '缺少必要参数',
        'transverse_letter'     => '请选择横向堆放位编号',
        'portrait_letter'          => '请输入纵向堆放位编号',
        'box_count'     => '请输入可放货箱柜数量',
    ];
    
    protected $scene = [
        'add_stacking_position' => ['transverse_letter','portrait_letter','box_count'],
        'edit_stacking_position' => ['id','transverse_letter','portrait_letter','box_count'],
    ];
}

 ?>
